<template>
  <div>
      <div class="loginBox">
          <h1>登录页面</h1>
        <span>账号：</span><input type="number" v-model.number="id">
        <span>密码：</span><input type="password" v-model.number="password">
        <hr>
        <button @click="login">登录</button>
      </div>
  </div>
</template>

<script>
export default {
    data()
    {
        return {
            id: '',
            password: '',
            getpassword: '',
        }
    },
    methods:
    {
        async login()
        {
             function()
            {
                const {data: res} = await axios.get('http://www.liulongbin.top:3006/api/getbooks', 
                {
                    params: {id: 1}
                })
                console.log(res);
            }
    }
}
</script>

<style>
    .loginBox
    {
        width: 600px;
        height: 300px;
        background-color: pink;
    }
</style>